#!/bin/bash
# 依赖：date
set -e
function print_definition {
cat << EOF
{
    "type": "function",
    "function": {
        "name": "get_cur_time",
        "description": "Get the current time",
        "parameters": {
            "type":"void"
        }
    }
}
EOF
exit
}
function print_system {
cat << EOF
### get_cur_time 工具
获取当前的时间戳，输出人类可读
EOF
exit
}
if [ $# -gt 0 ]; then
    if [ $1 = '--help' ]; then
        print_system
    elif [ $1 = '-h' ]; then
        print_system
    elif [ $1 = '--usage' ]; then
        print_definition
    elif [ $1 = '-?' ]; then
        print_definition
    fi
fi

date 1>&2